/*
 * @Author: taiyunhang
 * @Date: 2019-01-10 16:31:16
 * */

import types from '../types';

export default {
  [types.LOGIN](state, value) {
    state.token = value;
  },
  [types.LOGOUT](state) {
    state.token = '';
  },
  [types.OPEN_LOADING](state) {
    state.loading = true;
  },
  [types.CLOSE_LOADING](state) {
    state.loading = false;
  },
  [types.SET_CITYNAME](state, value) {
    state.cityName = value;
  }
};
